// 封装提示效果
import { Toast } from "antd-mobile";

export const ShowLoading = (msg:string = "加载中…") => {
    Toast.clear()
    Toast.show({
        icon:'loading',
        content:msg,
        duration:0,
    })
}

export const ShowFail = (msg:string = "失败") => {
    Toast.clear()
    Toast.show({
        icon:"fail",
        content:msg,
        duration:1000,
    })
}

export const ShowSuccess  = (msg:string = "成功") => {
    Toast.clear()
    Toast.show({
        icon:"success",
        content:msg,
        duration:1000
    })
}

export const ShowMessage  = (msg:string='轻提示') => {
    Toast.clear()
    Toast.show({
        content: msg,
        duration:1500,
    })
}

export const ShowPassword = (msg:string='两次密码不相同') => {
    Toast.clear()
    Toast.show({
        content:msg,
        duration:0
    })
}